<template>
  <div>
    <van-nav-bar title="客户列表" left-text="返回" left-arrow @click-left="onClickLeft" />
    <van-grid :column-num="3">
      <van-grid-item v-for="(value,keys) in list" :key="keys">
        <a :href="'tel:'+value.mobile">
          <a>{{value.uname}}</a>
          <a class='mobile'>{{value.mobile}}</a>
        </a>
      </van-grid-item>
    </van-grid>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        list: {},
      }
    },
    computed: {},
    watch: {},
    created() {
      const _this = this
      this.list = this.$help.Cache('clientele')
      if (this.list === false) {
        const _this = this
        this.$help.Request.get('/fule/clientele').then(res => {
          _this.list = res['data']
          _this.$help.Cache('clientele', res['data'], 3600)
        })
      }
    },
    methods: {
      onClickLeft() {
        this.$router.push('/')
      },
      tel(mobile) {
        console.log(mobile)

      }
    }
  }
</script>

<style>
  .mobile {
    font-size: 0.4rem;
  }

  a {
    text-decoration: none;
    color: #000000;
  }
</style>
